package com.shen.web.intercepter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class MyIntercepter1 extends AbstractInterceptor {

	private static final long serialVersionUID = 101168174784259844L;

	private static Logger logger = LoggerFactory.getLogger(MyIntercepter1.class);
	
	@Override
	public String intercept(ActionInvocation invocation) throws Exception {
		logger.debug("----- intercepter 1 start -----");
		String result = invocation.invoke();
		logger.debug("----- intercepter 1 end  -----");
		return result;
	}
	
	@Override
	public void destroy() {
		logger.debug("----- intercepter 1 destroy  -----");
		super.destroy();
	}

	@Override
	public void init() {
		logger.debug("----- intercepter 1 init  -----");
		super.init();
	}

}
